package com.oa.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.oa.dao.PowerDao;
import com.oa.entity.Power;
import com.oa.service.PowerService;

@Service("powerService")
@Transactional
public class PowerServiceImpl implements PowerService {

	
	@Resource(name="powerDao")
	private PowerDao powerDao;
	
	// 根据ID查询所有权限
	public List<Power> getByIds(String[] postIds) {
		return powerDao.getEntityByIds(postIds);
	}

	// 查询所有权限
	public List<Power> findAll() {
		return powerDao.findAllEntity();
	}

	// 查询顶级权限
	public List<Power> findTopList() {
		return powerDao.findTopList();
	}

	
}
